import {Base} from '../../utils/Base.js';
class Home extends Base
{
  constructor(){
    super();
  }

  //获取首页banner
  getBannerData(callback){
    var that = this;
    var param = {
      url: 'banner/1',
      sCallback: function (data) {
        data = data.items;
        callback && callback(data);
      }
    };
    this.request(param);
  }
  //精选主题
  getThemeData(callback){
    var that = this;
    var param = {
      url: 'theme?ids=1,2,3',
      sCallback: function (data) {
        data = data.data;
        callback && callback(data);
      }
    };
    this.request(param);
  }
  //最近新品
  getRecentData(callback) {
    var that = this;
    var param = {
      url: 'product/recent/12',
      sCallback: function (data) {
        data = data.data;
        callback && callback(data);
      }
    };
    this.request(param);
  }
}
export {Home};